<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<style>
    div.list:hover {
        background-color: #FFF5EE;
    }

    div.select-list {
        background-color: #a2e2ff;
    }

    .accordion-inner {
        font-size: 18px;
    }
</style>

<div style="text-align:center;" style="margin-bottom:1%;">
    <b style="font-size:24px;">发布公告</b><br> <span
        style="color:grey; font-size:16px">先选择接收用户，再进行公告编辑、发送</span>
</div>
<div style="margin-bottom:1%;">

    <div class="input-append" style="width:100%;">

        <button class="btn" type="button" onclick=""
                style="width:10%;height:50px;font-size:18px;">搜索
        </button>
        <input type="search" placeholder="请输入用户的名称/ID以进行搜索"
               style="width:90%;height:40px;">
    </div>

</div>
<ul class="nav nav-tabs">
    <li role="presentation" class="active"
        style="width:33%;text-align:center;font-size:20px;"><a data-notice-user-type="school"
                                                               href="#" class="unselected"
                                                               onclick="select(this)">学校用户</a></li>
    <li role="presentation"
        style="width:33%;text-align:center;font-size:20px;"><a href="#" data-notice-user-type="county"
                                                               class="unselected" onclick="select(this)">区县用户</a></li>
    <li role="presentation"
        style="width:33%;text-align:center;font-size:20px;"><a href="#" data-notice-user-type="leader"
                                                               class="unselected" onclick="select(this)">高级用户</a></li>
</ul>

<div class="row-fluid">
    <div class="span12" id="content2">

        <div class="accordion" id="notice_list">
        </div>

        <!-- 分页控件 -->
        <div>
            <ul id="pagination"
                class="pagination jq-pagination pagination-centered"
                style="font-size:18px;">

            </ul>
        </div>
        <hr>
        <div>
            <button id="publish-btn" class="btn disabled btn-primary btn-large" onclick="openNoticeModal()"
                    style="float:right;width:10%;">编辑公告
            </button>
        </div>

        <div id="publish-modal" class="modal hide fade" role="dialog"
             aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                        aria-hidden="true">×
                </button>
                <h3 id="myModalLabel">编辑公告</h3>
            </div>
            <div class="modal-body">
                <div class="null-list container" style="width: 100%;overflow: hidden;">
                    <div class="container" style="font-size:18px;width: 45%;float:left;">公告类型</div>
                    <div class="container"
                         style="font-size:18px;text-align:right;width: 45%;float:right;">
                        <select id="notice_type" style="font-size:18px;height:40px;">
                            <option value="0">请选择公告类型</option>
                            <option value="1">自定义</option>
                            <option value="2">填报 - 学校基本信息管理</option>
                            <option value="3">填报 - 专业年级与课程建设信息</option>
                            <option value="4">填报 - 参与职教集团情况信息</option>
                            <option value="5">填报 - 办学条件信息</option>
                            <option value="6">填报 - 国际合作信息</option>
                            <option value="7">填报 - 校企合作信息</option>
                            <option value="8">填报 - 教师基本情况</option>
                            <option value="9">填报 - 公共课教师情况</option>
                            <option value="10">填报 - 专业大类教师情况</option>
                            <option value="11">填报 - 学生基本情况</option>
                            <option value="12">填报 - 职业培训情况</option>
                            <option value="13">填报 - 学校实训基地</option>
                            <option value="14">填报 - 专业大类实训基地</option>
                            <option value="15">填报 - 公用实训基地</option>
                            <option value="16">填报 - 教学计划基本情况</option>
                            <option value="17">填报 - 项目申报</option>
                            <option value="18">填报 - 项目进度</option>
                        </select>
                    </div>
                </div>
                <div class="null-list container" style="width: 100%;overflow: hidden;">
                    <textarea cols="50" rows="5" id="notice_content" onfocus="if(value=='公告内容,限100字'){value=''}"
                              onblur="if (value ==''){value='公告内容,限100字'}"  style="width: 97%;height: 200px;font-size:16px;">公告内容,限100字</textarea>
                    </textarea>

                </div>
                <div class="null-list container" style="width: 100%;overflow: hidden;">
                    <div class="container"
                         style="font-size:18px;text-align:right;width: 45%;float:right;">
                       <span
                               id='attachment-name' style="width: 300px;"></span>
                        <button
                                class='btn btn-large btn-info ' onclick='chooseFile(this)'
                                style='margin-left:1%;'>添加附件
                        </button>
                        <input id="attachment_file" onchange='selectFile(this)' type='file'
                               style='display:none;'>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button class="btn btn-large btn-primary" onclick="publishNotice()">发布</button>
                <button class="btn btn-large" data-dismiss="modal" aria-hidden="true">关闭</button>
            </div>
        </div>

        <div id="alert-modal" class="modal hide fade" role="dialog"
             aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                        aria-hidden="true">×
                </button>
                <h3 id="">提示信息</h3>
            </div>
            <div class="modal-body">
                <p id="alert-infor">发布成功</p>
            </div>
            <div class="modal-footer">
                <button class="btn btn-large" data-dismiss="modal" aria-hidden="true">关闭</button>
            </div>
        </div>

        <script type="text/javascript">
            // 初始化分页
            initNoticePage(1);
            // 初始化选择用户数组
            var schoolUserList = new Array();
            var countyUserList = new Array();
            var leaderUserList = new Array();
        </script>

    </div>
</div>
